package com.hjc.controller;

import com.hjc.entity.Result;
import com.hjc.entity.Store;
import com.hjc.page.Page;
import com.hjc.service.StoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/store")
public class StoreController {
    @Autowired
    private StoreService storeService;

//    http://localhost:3000/api/store/store-page-list?
//    storeName=&storeAddress=&concat=&phone=&pageSize=5&pageNum=1&totalNum=0
    @RequestMapping("/store-page-list")
    public Result findStorePage(Store store, Page page) {
        return storeService.findStoreByPage(store, page);
    }
}
